This invention relates to a method and apparatus for generating representations of three dimensional objects, e.g., mechanical parts, in a computer aided design (CAD) system.
Prior art CAD systems have generally been either two dimension (2D) systems, which are based on two dimensional geometry, or three dimension (3D) systems, which are based on three dimensional geometry. 3D-systems have advantages over 2D-systems in that they allow three dimensional topological checks, perspective and shaded views, and three dimensional model manipulation.
3D systems typically may be either wire frame systems, surface systems or solid modeling systems. In a wire frame system the three dimensional geometry of an object is described only in lines defining the object edges. This description allows compact data structure and fast system response. Unfortunately, wire frame systems allow only incomplete topological checks with the result that an invalid geometry may be defined.
In 3D surface systems, descriptions are based on a wire frame system with the additional ability to handle information about object surfaces. Unfortunately, surface systems have the same limited ability to perform topological checks as do wire frame systems.
In 3D solid modeling systems, complex algorithms are used to allow complete three dimensional topological checks so that a valid geometry can always be maintained. Unfortunately, this results in very slow system response especially when three dimensional object topology is checked.
In accordance with the illustrated preferred embodiments of the present invention, a CAD system has an improved and simplified user interface while also retaining the major advantages of the three types of 3D systems. In the preferred embodiments, a CAD system includes a processor which is connected through various registers to one or more user input devices such as keyboards or graphics tablets. The processor is also connected to at least one user display device such as a graphics CRT screen.
In accordance with the preferred embodiments, the CAD system has the ability to operate in either a 2D mode or in a 3D mode. In the 2D mode, the processor only accepts and processes commands relating to the two dimensional geometry of an object in a given plane and has access to a 2D memory. In this mode, the processor operates under control of instructions contained in a 2D instruction memory.
In the event that a command is entered that relates to the 3D geometry of the object, processor control is transferred to a transformation instruction memory. Transformation instructions cause the processor to transform the 2D geometry into a corresponding 3D geometry. Control is then transferred to a 3D instruction memory to allow the processor to operate based upon a 3D geometry while having access to a 3D memory.
The preferred embodiments combine the ease of use and fast response times of 2D CAD systems with the three dimensional capabilities of 3D CAD systems. In 2D mode, design procedures are performed under control of instructions contained in the 2D instruction memory and the user interacts with the system as if it were a 2D system. In particular, only commands and data that relate to the 2D geometry of a specific plane (the "work plane") may be entered. Typically, the work plane is displayed on the user's graphics screen.
In the 2D mode, instructions from an existing 2D system can be stored in the 2D instruction memory or an existing 2D instruction memory may be useable. If, as may be the case, the user is experienced only in prior 2D systems, user familiarization is easily accomplished on the system since no new commands or procedures are necessary. In addition, while in 2D mode the system performs functions and procedures on a 2D basis with the result that very fast response times are possible.
In contrast to prior art systems, the system in accordance with the preferred embodiments is also capable of receiving commands that affect the 3D geometry of the object to be displayed. For example, the user can enter a command to create a solid object from a 2D profile by the use of an extrusion operation. Other 3D operations could mill a hole with a given 2D profile or stamp 2D profiles through existing 3D objects. Since these operations cannot be performed in the work plane under control of the 2D instructions, the following operations are performed. First, the 2D mode geometry is transformed into a corresponding 3D geometry. Then, control is passed from the 2D instruction memory to a 3D instruction memory. In one preferred embodiment of the present invention a topological check is perfomed on the object to ensure, for example, that no intersections or branches of geometric components occur.
In prior art 3D systems such topological checks are often unsatisfactory. In wire frame or surface systems invalid geometries may result and topological checks in solid modeling systems can be very time consuming. The preferred embodiment avoids both of these problems of the prior art. In the preferred embodiment, the topological check is complete and no invalid geometries can be defined. In addition, the topological check is only performed when a 3D command is received with the result that only a minimal slow down of the system is caused. This differs from prior art solid modeling systems in which topological checks are performed every time that a new geometric element is added to the object. Furthermore, slow downs are minimized since topological checks can be performed on a 2D basis.
When a 3D command is received and the transformation instructions are completed, control is passed to the 3D instruction memory. Under control of the 3D instructions, the processor stores the 3D geometry in a 3D memory. Control is then transferred back to the 2D instruction memory so that the user can continue to enter commands.
Thus, in accordance with the preferred embodiments, 3D operations are performed only when necessary. At all other times, operation is performed on the two dimensional work plane.
In accordance with another preferred embodiment of the present invention, the user has the additional ability to select any of a number of views for display. Upon transfer of control to the 3D instruction memory, the processor creates a three dimensional view of the object and stores it in the 2D memory. In a like manner, views in 2D planes other than the work plane (such as a ninety degree rotation) can be created under control of the 3D instruction memory and stored in the 2D memory. Upon selection by the user these specific views can be shown on the display by access to the 2D memory. In this case, the views are only updated each time control is transferred to the 3D instruction memory by the transformation instruction memory.
If the user creates views of other planes in 3D mode, these planes can be defined as new work planes for use in 2D mode. In addition, the user can define a new work plane which may lie at an angle to the original work plane. This capability is often useful if the object has a sloping surface which is definable as the new work plane so that all functions and operations can be performed on this surface in 2D mode.
In another preferred embodiment of the present invention, the user can directly access the 3D instruction memory. This may be useful, for example, to call up pre-defined objects, such as blocks, cones, cubes, cylinders or spheres. Direct access to the 3D instruction memory additionally may allow other operations such as Boolean operations. Even direct modification of the object in 3D mode could be possible.
In accordance with the preferred embodiments, the 3D instructions can be based on any of the prior art types of 3D systems. It is often the case that solid modelling system instructions are preferred.